﻿using System;
using System.Collections.Generic;
using System.Text;

namespace CFSystem.JXC.IDAL
{
    using CFSystem.JXC.Model;

    public interface IProductDAL
    {
        /// <summary>
        /// Method to get all ProductInfo
        /// </summary>		
        /// <returns>Interface to Model Collection Generic of products</returns>
        IList<ProductInfo> GetAllProducts();

        /// <summary>
        /// Method to search one product by either of following conditions: Product ID/Name/BarCode
        /// </summary>
        /// <param name="strSearch">Search string</param>
        /// <returns>Interface to Model Collection Generic of products</returns>
        IList<ProductInfo> SearchProduct(string strSearch);

        /// <summary>
        /// Add a new product
        /// </summary>
        /// <param name="product">Product object to be added</param>
        void AddProduct(ProductInfo product);

        /// <summary>
        /// Delete an existing product
        /// </summary>
        /// <param name="productID">Product ID indicating the product to be deleted</param>
        void DeleteProduct(string productID);

        /// <summary>
        /// Update a product data
        /// </summary>
        /// <param name="product">Product object to be updated</param>
        void UpdateProduct(ProductInfo product);
    }
}
